package com.lovo.homework0201.service.impl;

import com.lovo.homework0201.dao.IUserPowerDao;
import com.lovo.homework0201.entity.UserPowerEntity;
import com.lovo.homework0201.service.IUserPowerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserPowerServiceImpl implements IUserPowerService {

    @Autowired
    IUserPowerDao userPowerDao;
    @Override
    public List<UserPowerEntity> queryUserPower(long userId) {
        List<UserPowerEntity> allByUserAndPower = userPowerDao.findAllByUserAndPower(userId);
        return allByUserAndPower;
    }
}
